//
//  Extension.swift
//  TJHWeiBo
//
//  Created by tianjunhui on 16/8/9.
//  Copyright © 2016年 itcast.cn. All rights reserved.
//

import UIKit

extension UIImageView{
    
    //遍历构造函数
    convenience init (imageName: String){
        
        self.init(image: UIImage (named: imageName))
    }
    // 对SDWebImage 封装一次
    func hm_setImageWithString(imgName: String?,placeholderImgName: String){
        self.sd_setImageWithURL(NSURL(string: imgName ?? ""), placeholderImage: UIImage(named: placeholderImgName))
    }

}
